package com.usermanage.Service;

import com.usermanage.beanParam.QuotaBean;
import com.usermanage.beanParam.SkuParam;

import java.util.List;

/**
 * Created by 過客 on 2018/8/10
 */
public interface QuotaService {

    /**
     *根据组织id查询组织下定额列表
     * @param groupId
     * @return
     */
    List searchQuota(String groupId);

    /**
     * 创建一个定额
     * @param quotaParam
     * @return
     */
    int creatQuota(QuotaBean quotaParam);

    /**
     * 根据定额名称验证定额是否存在
     * @param quotaName
     * @return
     */
    Boolean isExistQuota(String quotaName);

    /**
     *
     * @param groupId
     * @param skuId
     * @return
     */
    Boolean checkSkuQuota(String groupId,String skuId);
    /**
     * 为sku绑定定额
     * @param groupId
     * @param skuId
     * @param quotaId
     * @return
     */
    int addSkuQuota(String groupId,String skuId,String quotaId);


    /**
     *根据sku和定额计算sku的价格
     * @param skuParam
     * @return
     */
    SkuParam calculateQuota(SkuParam skuParam);
}
